package com.example.monstercatch;

import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.content.Intent;
import android.content.pm.ActivityInfo;

public class Menu extends Activity {

	private final String TAG = "Menu";
	private MenuView menuView;
	private BluetoothAdapter btAdapter;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		// Screen adjustments
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		
		btAdapter = BluetoothAdapter.getDefaultAdapter();

		
		MinhasCoisas.setCurrentActivity(this);
		menuView = new MenuView(this, btAdapter);
		setContentView(menuView);
		
	}
	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
	    
	    if (requestCode == REQUEST.REQUEST_ENABLE_BT) {
	        
	        if (resultCode == RESULT_OK) {
	        	// TESTAR
	        }
	    }
	}
	@Override
	public void onDestroy()
	{
		super.onDestroy();
		//this.cenaDeJogo.SetAlive(false);
		this.menuView.SetAlive(false);
	}
}
